package com.example.myroom;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "Word")
public class Word {
    @PrimaryKey(autoGenerate = true)//标记为主键
    private int id;
    @ColumnInfo(name = "ChineseMeaning")//列的名称
    private String ChineseMeaning;
    @ColumnInfo(name = "word")
    private String word;

    public Word() {
    }

    public Word(String chineseMeaning, String word) {
        ChineseMeaning = chineseMeaning;
        this.word = word;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getChineseMeaning() {
        return ChineseMeaning;
    }

    public void setChineseMeaning(String chineseMeaning) {
        ChineseMeaning = chineseMeaning;
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }
}
